getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Fri, 28 Jul 2017 01:04:41 +0000 (02:04 +0100)
committerRyan Tandy <ryan@nardis.ca>
Fri, 28 Jul 2017 01:04:41 +0000 (02:04 +0100)
commit8800d39e3b73cd3a5803578a40afc9bfb65d9996
tree8cc9c5eeddba08a12a452fd75ed4229602eb7292
parent26d36b5c4236881470c7325e09ffbca4db53a197
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c